x86: fix cache flushing condition in map_pages_to_xen()
authorJan Beulich <jbeulich@suse.com>
Thu, 18 Jul 2013 08:05:14 +0000 (10:05 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 18 Jul 2013 08:05:14 +0000 (10:05 +0200)
commite36e07bc9b0be0d899d4dd0ea675f6c225dafe5c
tree83149dec311543a053c445db196073824996ac8d
parent915a59f25c5eddd86bc2cae6389d0ed2ab87e69e
x86: fix cache flushing condition in map_pages_to_xen()

This fixes yet another shortcoming of the function (exposed by 8bfaa2c2
["x86: add locking to map_pages_to_xen()"]'s adjustment to
msix_put_fixmap()): It must not flush caches when transitioning to a
non-present mapping. Doing so causes the CLFLUSH to fault, if used in
favor of WBINVD.

To help code readability, factor out the whole flush flags updating
in map_pages_to_xen() into a helper macro.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/mm.c